<?php

namespace App\Http\Models;

use Illuminate\Database\Eloquent\Model;

class MemberVipSettingsRecordModel extends Model
{
    const STATUS_DELETED    = 0;
    const STATUS_ACTIVE     = 1;

	protected $connection = 'db_main';
	protected $table = 'sdk_member_vip_settings_record';
	public $timestamps = false;

    public static function addRecord($uid, $key, $value) {
        if(!$uid || !$key || !$value) return false;

        $data['uid'] = $uid;
        $data['item_key'] = $key;
        $data['item_value'] = $value;
        $data['create_time'] = time();
        $data['status'] = self::STATUS_ACTIVE;

        return self::create($data);
    }
}

